#include<stdio.h>
#include<math.h>
int batten(int n, int k);
int main(void)
{
	int n, k;
	scanf("%d%d", &n, &k);
	printf("%d", batten(n, k));
	return 0;
}
int batten(int n, int k)
{
	float n1, n2;
	int s;
	if (n <= k)
	{
		return 1;
	}
	n1 = n * 2 / 5;
	n1 = round(n1);
	n2 = n - n1;
	s = batten(n1, k) + batten(n2, k);
	return s;
}
